<script setup lang="ts">
import Content from './content.vue'
import { ref, reactive } from 'vue'
import  { useRouter } from 'vue-router'
const formData = reactive([
    // "国家级一流本科专业建设点","省级一流本科专业建设点",
        // "通过师范专业认证专业","专业评诂获得前五名成绩专业",
        // "省特色专业","省级专业综合改革项目试点",
        // "贵州省“双一流”建设项目","其他专业建设"
    {
        id:1,
        name:"专业建设",
        list:[{
            title:"国家级一流本科专业建设点",
            info:[
                "国家一流"
            ]
        },{
            title:"省级一流本科专业建设点",
            info:[
                "省级一流"
            ]
        },{
            title:"通过师范专业认证专业",
            info:[
                "师范认证"
            ]
        },{
            title:"专业评诂获得前五名成绩专业",
            info:[
                "专业评估"
            ]
        },{
            title:"省特色专业",
            info:[
                "省级特色"
            ]
        },{
            title:"省级专业综合改革项目试点",
            info:[
                "省级专业"
            ]
        },
        {
            title:"贵州省“双一流”建设项目",
            info:[
                "省双一流"
            ]
        },
        {
            title:"其他专业建设",
            info:[
                "其他专业"
            ]
        },]
    },

    // list:["国家级一流课程建设","省级一流课程建设",
    //     "校级一流课程建设（或培育","国家级思政课程建设",
    //     "省级思政课程建设","校级思政课程建设（或培育）","国家级金课建设",
    //     "省级金课建设","校级金课建设（或培育）","省级精品课程","其他课程建设（或培育）"]
    // },
    {
        id:2,
        name:"课程建设",
        list:[
            {
            title:"国家级一流课程建设",
            info:[
                "国家级一流课程建设"
            ]
        },{
            title:"省级一流课程建设",
            info:[
                "省级一流课程建设"
            ]
        },{
            title:"校级一流课程建设（或培育)",
            info:[
                "校级一流课程建设（或培育"
            ]
        },{
            title:"国家级思政课程建设",
            info:[
                "国家级思政课程建设"
            ]
        },{
            title:"省级思政课程建设",
            info:[
                "省级思政课程建设"
            ]
        },{
            title:"校级思政课程建设（或培育）",
            info:[
                "校级思政课程建设（或培育）"
            ]
        },{
            title:"国家级金课建设",
            info:[
                "国家级金课建设"
            ]
        },{
            title:"省级金课建设",
            info:[
                "省级金课建设"
            ]
        },{
            title:"校级金课建设（或培育）",
            info:[
                "校级金课建设（或培育）"
            ]
        },{
            title:"省级精品课程",
            info:[
                "省级精品课程"
            ]
        },{
            title:"其他课程建设（或培育）",
            info:[
                "其他课程建设（或培育）"
            ]
        },]
    },
    // "省级教改项目","校级教改项目（或培育）",
    //     "省级卓越人才培养计划项目","其他教改项目"
    {
        id:3,
        name:"教改项目",
        list:[{
            title:"省级教改项目",
            info:[
                "省级教改项目"
            ]
        },{
            title:"校级教改项目（或培育）",
            info:[
                "校级教改项目（或培育）"
            ]
        },{
            title:"省级卓越人才培养计划项目",
            info:[
                "省级卓越人才培养计划项目"
            ]
        },{
            title:"其他教改项目",
            info:[
                "其他教改项目"
            ]
        },]
    },
    // "国家级教学成果奖","省级教学成果奖",
    //     "校级教学成果奖","其他教学成果奖"
    {
        id:4,
        name:"教学成果奖",
        list:[{
            title:"国家级教学成果奖",
            info:[
                "国家级教学成果奖"
            ]
        },{
            title:"省级教学成果奖",
            info:[
                "省级教学成果奖"
            ]
        },{
            title:"校级教学成果奖",
            info:[
                "校级教学成果奖"
            ]
        },{
            title:"其他教学成果奖",
            info:[
                "其他教学成果奖"
            ]
        },]
    },
    // "国家级教学比赛","省级教学比赛",
    //     "校级教学比赛","其他教学比赛比赛"
    {
        id:5,
        name:"教师获奖",
        list:[{
            title:"国家级教学比赛",
            info:[
                "国家级教学比赛"
            ]
        },{
            title:"省级教学比赛",
            info:[
                "省级教学比赛"
            ]
        },{
            title:"校级教学比赛",
            info:[
                "校级教学比赛"
            ]
        },{
            title:"其他教学比赛比赛",
            info:[
                "其他教学比赛比赛"
            ]
        },]
    },
    // "国家级教学团队或平台","省级教学团队或平台","其他教学团队或平台"
    {
        id:6,
        name:"教学团队或平台",
        list:[{
            title:"国家级教学团队或平台",
            info:[
                "国家级教学团队或平台"
            ]
        },{
            title:"省级教学团队或平台",
            info:[
                "省级教学团队或平台"
            ]
        },{
            title:"其他教学团队或平台",
            info:[
                "其他教学团队或平台"
            ]
        },]
    },
    {
        id:7,
        name:"其它教学研究",
        list:[
        {
            title:"其他教学团队或平台",
            info:[
                "其他教学团队或平台"
            ]
        },]
    }
])

let itemdata = reactive({
        id:1,
        name:"专业建设",
        list:[{
            title:"国家级一流本科专业建设点",
            info:[
                "国家一流"
            ]
        },{
            title:"省级一流本科专业建设点",
            info:[
                "省级一流"
            ]
        },{
            title:"通过师范专业认证专业",
            info:[
                "师范认证"
            ]
        },{
            title:"专业评诂获得前五名成绩专业",
            info:[
                "专业评估"
            ]
        },{
            title:"省特色专业",
            info:[
                "省级特色"
            ]
        },{
            title:"省级专业综合改革项目试点",
            info:[
                "省级专业"
            ]
        },
        {
            title:"贵州省“双一流”建设项目",
            info:[
                "省双一流"
            ]
        },
        {
            title:"其他专业建设",
            info:[
                "其他专业"
            ]
        },]
    },)
const chuandi = (data:any) =>{
    itemdata.name = data.name
    itemdata.list = data.list
}

const route = useRouter();
const  tiaozhuan = () =>{
    route.push({path:'/detials'})
}

</script>

<template>
    <div>
        <div class="homeheader">
        <div class="right">
            <img src="../../static/header.png" alt="">
        </div>
        <div class="left">
            <input type="text" name="" placeholder="请输入搜索内容">
            <button>搜索</button>
        </div>
    </div>
    <div>
    </div>
    <div class="Nav1">
        <ul class="yiji">
            <li v-for="(item,index) in formData" :key="item.id">
                <a href="javascript:;" @click="chuandi(item)">{{item.name}}</a>
                <ul class="erji">
                    <li v-for="(item1,index) in item.list">
                        <a href="">{{item1.title}}</a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    <div class="content">
        <div class="content-img">
            <img style="width: 100%;height:220px" src="../../static/content.jpg" alt="">
        </div>
    </div>
    </div>
    <Content :dataList="itemdata"/>
</template>




<style scoped>
body{
   line-height: 20px;
   background: #f4f4f4;
   min-height: 1200px;
}

.homeheader{
    width: 1200px;
    margin: 0 auto;
    height: 80px;
    line-height: 80px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
a,ul,li{
    list-style: none;
    margin: 0;
    padding: 0;
    text-decoration:none
}
.Nav1{
    width: 1200px;
    height: 40px;
    background: #528adc;
    margin: 0px auto;
    border-top: 1px solid #0063b7;
}
.yiji{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    line-height: 40px;
}
a{
    display: block;
    color: #ffff;
}

/* .Nav1 li ul{
    
} */
.Nav1 li{
    width:120px;
    float: left;
    text-align: center;
    font-size: 14px;
    position: relative;
}
.erji{
    display: flex;
    flex-direction: column;
    
    align-items: center;
    position: absolute;
    left: 0;
    right: 0;
    line-height: 20px;
    top: 100%;
    background: #0951bb;
    z-index: 999;
    color: black;
    /* display: none; */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s;
    -webkit-transform: max-height 0.5s ease-out;
}
.erji li{
    width: 100%;
    margin-bottom: 10px;
    margin-left: 20px;
    margin-right: 20px;
    line-height: 20px;
    font-size: 13px;
    
}
.yiji li:hover .erji{
     max-height: 800px;
      transition: max-height 0.5s;
      max-height: 200px;
     overflow-y: scroll;
     -webkit-transform: max-height 0.5s ease-in;
}

.yiji li a:hover{
    background: #2961b3;
}
.content{
    width: 1200px;
    height: auto;
    margin: 0 auto;
    background: #fff;
}
 .content .content-img{
    width: 1177px;
    height: 220px;
    margin: 0 auto;
    padding: 10px 0px 20px 0px;
}


/* ::-webkit-scrollbar {
width:5px;
background: #FFFFFF;
}

::-webkit-scrollbar-track {
-webkit-box-shadow:inset006pxrgba(0,0,0,0.3);
border-radius:10px;
}

::-webkit-scrollbar-thumb {
border-radius:10px;
background:#999;
-webkit-box-shadow:inset006pxrgba(0,0,0,0.5);
} */

</style>
